(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, B) → B
and(B, T) → B
and(F, B) → F
and(B, F) → F
imp(T, B) → B
imp(F, B) → T
not(T) → F
not(F) → T
if(T, B1, B2) → B1
if(F, B1, B2) → B2
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(N2)) → F
eqt(nil, int(N2)) → F
eqt(nil, cons(H2, T2)) → F
eqt(nil, tuple(H2, T2)) → F
eqt(nil, tuplenil(H2)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(N2)) → F
eqt(a, int(N2)) → F
eqt(a, cons(H2, T2)) → F
eqt(a, tuple(H2, T2)) → F
eqt(a, tuplenil(H2)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(N2)) → F
eqt(excl, eqt(false, int(N2))) → F
eqt(false, cons(H2, T2)) → F
eqt(false, tuple(H2, T2)) → F
eqt(false, tuplenil(H2)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(N2)) → F
eqt(lock, int(N2)) → F
eqt(lock, cons(H2, T2)) → F
eqt(lock, tuple(H2, T2)) → F
eqt(lock, tuplenil(H2)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(N2)) → F
eqt(locker, int(N2)) → F
eqt(locker, cons(H2, T2)) → F
eqt(locker, tuple(H2, T2)) → F
eqt(locker, tuplenil(H2)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(N2)) → F
eqt(ok, int(N2)) → F
eqt(ok, cons(H2, T2)) → F
eqt(ok, tuple(H2, T2)) → F
eqt(ok, tuplenil(H2)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(N2)) → F
eqt(pending, int(N2)) → F
eqt(pending, cons(H2, T2)) → F
eqt(pending, tuple(H2, T2)) → F
eqt(pending, tuplenil(H2)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(N2)) → F
eqt(request, int(N2)) → F
eqt(request, cons(H2, T2)) → F
eqt(request, tuple(H2, T2)) → F
eqt(request, tuplenil(H2)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(N2)) → F
eqt(resource, int(N2)) → F
eqt(resource, cons(H2, T2)) → F
eqt(resource, tuple(H2, T2)) → F
eqt(resource, tuplenil(H2)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(N2)) → F
eqt(tag, int(N2)) → F
eqt(tag, cons(H2, T2)) → F
eqt(tag, tuple(H2, T2)) → F
eqt(tag, tuplenil(H2)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(N2)) → F
eqt(true, int(N2)) → F
eqt(true, cons(H2, T2)) → F
eqt(true, tuple(H2, T2)) → F
eqt(true, tuplenil(H2)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(H2)) → F
eqt(pid(N1), nil) → F
eqt(pid(N1), a) → F
eqt(pid(N1), excl) → F
eqt(pid(N1), false) → F
eqt(pid(N1), lock) → F
eqt(pid(N1), locker) → F
eqt(pid(N1), mcrlrecord) → F
eqt(pid(N1), ok) → F
eqt(pid(N1), pending) → F
eqt(pid(N1), release) → F
eqt(pid(N1), request) → F
eqt(pid(N1), resource) → F
eqt(pid(N1), tag) → F
eqt(pid(N1), true) → F
eqt(pid(N1), undefined) → F
eqt(pid(N1), pid(N2)) → eqt(N1, N2)
eqt(pid(N1), int(N2)) → F
eqt(pid(N1), cons(H2, T2)) → F
eqt(pid(N1), tuple(H2, T2)) → F
eqt(pid(N1), tuplenil(H2)) → F
eqt(int(N1), nil) → F
eqt(int(N1), a) → F
eqt(int(N1), excl) → F
eqt(int(N1), false) → F
eqt(int(N1), lock) → F
eqt(int(N1), locker) → F
eqt(int(N1), mcrlrecord) → F
eqt(int(N1), ok) → F
eqt(int(N1), pending) → F
eqt(int(N1), release) → F
eqt(int(N1), request) → F
eqt(int(N1), resource) → F
eqt(int(N1), tag) → F
eqt(int(N1), true) → F
eqt(int(N1), undefined) → F
eqt(cons(H1, T1), resource) → F
eqt(cons(H1, T1), tag) → F
eqt(cons(H1, T1), true) → F
eqt(cons(H1, T1), undefined) → F
eqt(cons(H1, T1), pid(N2)) → F
eqt(cons(H1, T1), int(N2)) → F
eqt(cons(H1, T1), cons(H2, T2)) → and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) → F
eqt(cons(H1, T1), tuplenil(H2)) → F
eqt(tuple(H1, T1), nil) → F
eqt(tuple(H1, T1), a) → F
eqt(tuple(H1, T1), excl) → F
eqt(tuple(H1, T1), false) → F
eqt(tuple(H1, T1), lock) → F
eqt(tuple(H1, T1), locker) → F
eqt(tuple(H1, T1), mcrlrecord) → F
eqt(tuple(H1, T1), ok) → F
eqt(tuple(H1, T1), pending) → F
eqt(tuple(H1, T1), release) → F
eqt(tuple(H1, T1), request) → F
eqt(tuple(H1, T1), resource) → F
eqt(tuple(H1, T1), tag) → F
eqt(tuple(H1, T1), true) → F
eqt(tuple(H1, T1), undefined) → F
eqt(tuple(H1, T1), pid(N2)) → F
eqt(tuple(H1, T1), int(N2)) → F
eqt(tuple(H1, T1), cons(H2, T2)) → F
eqt(tuple(H1, T1), tuple(H2, T2)) → and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) → F
eqt(tuplenil(H1), nil) → F
eqt(tuplenil(H1), a) → F
eqt(tuplenil(H1), excl) → F
eqt(tuplenil(H1), false) → F
eqt(tuplenil(H1), lock) → F
eqt(tuplenil(H1), locker) → F
eqt(tuplenil(H1), mcrlrecord) → F
eqt(tuplenil(H1), ok) → F
eqt(tuplenil(H1), pending) → F
eqt(tuplenil(H1), release) → F
eqt(tuplenil(H1), request) → F
eqt(tuplenil(H1), resource) → F
eqt(tuplenil(H1), tag) → F
eqt(tuplenil(H1), true) → F
eqt(tuplenil(H1), undefined) → F
eqt(tuplenil(H1), pid(N2)) → F
eqt(tuplenil(H1), int(N2)) → F
eqt(tuplenil(H1), cons(H2, T2)) → F
eqt(tuplenil(H1), tuple(H2, T2)) → F
eqt(tuplenil(H1), tuplenil(H2)) → eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) → T1
element(int(s(0)), tuple(T1, T2)) → T1
element(int(s(s(N1))), tuple(T1, T2)) → element(int(s(N1)), T2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) → tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
record_updates(Record, Name, nil) → Record
record_updates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) → record_updates(record_update(Record, Name, Field, NewF), Name, Fields)
locker2_map_promote_pending(nil, Pending) → nil
locker2_map_promote_pending(cons(Lock, Locks), Pending) → cons(locker2_promote_pending(Lock, Pending), locker2_map_promote_pending(Locks, Pending))
locker2_map_claim_lock(nil, Resources, Client) → nil
locker2_map_claim_lock(cons(Lock, Locks), Resources, Client) → cons(locker2_claim_lock(Lock, Resources, Client), locker2_map_claim_lock(Locks, Resources, Client))
locker2_map_add_pending(nil, Resources, Client) → nil
locker2_promote_pending(Lock, Client) → case0(Client, Lock, record_extract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) → record_updates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) → Lock
locker2_remove_pending(Lock, Client) → record_updates(Lock, lock, cons(tuple(pending, tuplenil(subtract(record_extract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2_add_pending(Lock, Resources, Client) → case1(Client, Resources, Lock, member(record_extract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) → record_updates(Lock, lock, cons(tuple(pending, tuplenil(append(record_extract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) → Lock
locker2_release_lock(Lock, Client) → case2(Client, Lock, gen_modtageq(Client, record_extract(Lock, lock, excl)))
case2(Client, Lock, true) → record_updates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) → false
locker2_obtainables(nil, Client) → true
locker2_obtainables(cons(Lock, Locks), Client) → case5(Client, Locks, Lock, member(Client, record_extract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) → andt(locker2_obtainable(Lock, Client), locker2_obtainables(Locks, Client))
case5(Client, Locks, Lock, false) → locker2_obtainables(Locks, Client)
locker2_check_available(Resource, nil) → false
locker2_check_available(Resource, cons(Lock, Locks)) → case6(Locks, Lock, Resource, equal(Resource, record_extract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) → andt(equal(record_extract(Lock, lock, excl), nil), equal(record_extract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) → locker2_check_available(Resource, Locks)
locker2_check_availables(nil, Locks) → true
locker2_check_availables(cons(Resource, Resources), Locks) → andt(locker2_check_available(Resource, Locks), locker2_check_availables(Resources, Locks))
locker2_adduniq(nil, List) → List
append(cons(Head, Tail), List) → cons(Head, append(Tail, List))
subtract(List, nil) → List
subtract(List, cons(Head, Tail)) → subtract(delete(Head, List), Tail)
delete(E, nil) → nil
delete(E, cons(Head, Tail)) → case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) → Tail
case8(Tail, Head, E, false) → cons(Head, delete(E, Tail))
gen_tag(Pid) → tuple(Pid, tuplenil(tag))
gen_modtageq(Client1, Client2) → equal(Client1, Client2)
member(E, nil) → false
member(E, cons(Head, Tail)) → case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) → true
case9(Tail, Head, E, false) → member(E, Tail)
eqs(empty, empty) → T
eqs(empty, stack(E2, S2)) → F
eqs(stack(E1, S1), empty) → F
eqs(stack(E1, S1), stack(E2, S2)) → and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) → stack(E1, S1)
pops(stack(E1, S1)) → S1
tops(stack(E1, S1)) → E1
istops(E1, empty) → F
istops(E1, stack(E2, S1)) → eqt(E1, E2)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(E2, S2, CS2)) → F
eqc(calls(E1, S1, CS1), nocalls) → F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) → and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) → calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) → push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) → calls(E3, pushs(E2, S1), CS1)
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4), RECORD_UPDATE(z0, z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_PROMOTE_PENDING(z0, z2), LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_PROMOTE_PENDING(z0, z1) → c327(CASE0(z1, z0, record_extract(z0, lock, pending)), RECORD_EXTRACT(z0, lock, pending))
CASE0(z0, z1, cons(z0, z2)) → c328(RECORD_UPDATES(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil))))
LOCKER2_REMOVE_PENDING(z0, z1) → c330(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)), SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)), RECORD_EXTRACT(z0, lock, pending))
LOCKER2_ADD_PENDING(z0, z1, z2) → c331(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)), MEMBER(record_extract(z0, lock, resource), z1), RECORD_EXTRACT(z0, lock, resource))
CASE1(z0, z1, z2, true) → c332(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)), APPEND(record_extract(z2, lock, pending), cons(z0, nil)), RECORD_EXTRACT(z2, lock, pending))
LOCKER2_RELEASE_LOCK(z0, z1) → c334(CASE2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl))), GEN_MODTAGEQ(z1, record_extract(z0, lock, excl)), RECORD_EXTRACT(z0, lock, excl))
CASE2(z0, z1, true) → c335(RECORD_UPDATES(z1, lock, cons(tuple(excllock, excl), nil)))
LOCKER2_OBTAINABLES(cons(z0, z1), z2) → c338(CASE5(z2, z1, z0, member(z2, record_extract(z0, lock, pending))), MEMBER(z2, record_extract(z0, lock, pending)), RECORD_EXTRACT(z0, lock, pending))
CASE5(z0, z1, z2, true) → c339(LOCKER2_OBTAINABLES(z1, z0))
CASE5(z0, z1, z2, false) → c340(LOCKER2_OBTAINABLES(z1, z0))
LOCKER2_CHECK_AVAILABLE(z0, cons(z1, z2)) → c342(CASE6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource))), RECORD_EXTRACT(z1, lock, resource))
CASE6(z0, z1, z2, true) → c343(RECORD_EXTRACT(z1, lock, excl), RECORD_EXTRACT(z1, lock, pending))
CASE6(z0, z1, z2, false) → c344(LOCKER2_CHECK_AVAILABLE(z2, z0))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLE(z0, z2), LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2), DELETE(z1, z0))
DELETE(z0, cons(z1, z2)) → c352(CASE8(z2, z1, z0, equal(z0, z1)))
CASE8(z0, z1, z2, false) → c354(DELETE(z2, z0))
MEMBER(z0, cons(z1, z2)) → c358(CASE9(z2, z1, z0, equal(z0, z1)))
CASE9(z0, z1, z2, false) → c360(MEMBER(z2, z0))
EQS(stack(z0, z1), stack(z2, z3)) → c364(AND(eqt(z0, z2), eqs(z1, z3)), EQT(z0, z2), EQS(z1, z3))
ISTOPS(z0, stack(z1, z2)) → c369(EQT(z0, z1))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(AND(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5))), EQT(z0, z3), AND(eqs(z1, z4), eqc(z2, z5)), EQS(z1, z4), EQC(z2, z5))
PUSH(z0, z1, calls(z2, z3, z4)) → c375(PUSH1(z0, z1, z2, z3, z4, eqt(z0, z2)), EQT(z0, z2))
PUSH1(z0, z1, z2, z3, z4, T) → c376(PUSHS(z1, z3))
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4), RECORD_UPDATE(z0, z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_PROMOTE_PENDING(z0, z2), LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_PROMOTE_PENDING(z0, z1) → c327(CASE0(z1, z0, record_extract(z0, lock, pending)), RECORD_EXTRACT(z0, lock, pending))
CASE0(z0, z1, cons(z0, z2)) → c328(RECORD_UPDATES(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil))))
LOCKER2_REMOVE_PENDING(z0, z1) → c330(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)), SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)), RECORD_EXTRACT(z0, lock, pending))
LOCKER2_ADD_PENDING(z0, z1, z2) → c331(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)), MEMBER(record_extract(z0, lock, resource), z1), RECORD_EXTRACT(z0, lock, resource))
CASE1(z0, z1, z2, true) → c332(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)), APPEND(record_extract(z2, lock, pending), cons(z0, nil)), RECORD_EXTRACT(z2, lock, pending))
LOCKER2_RELEASE_LOCK(z0, z1) → c334(CASE2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl))), GEN_MODTAGEQ(z1, record_extract(z0, lock, excl)), RECORD_EXTRACT(z0, lock, excl))
CASE2(z0, z1, true) → c335(RECORD_UPDATES(z1, lock, cons(tuple(excllock, excl), nil)))
LOCKER2_OBTAINABLES(cons(z0, z1), z2) → c338(CASE5(z2, z1, z0, member(z2, record_extract(z0, lock, pending))), MEMBER(z2, record_extract(z0, lock, pending)), RECORD_EXTRACT(z0, lock, pending))
CASE5(z0, z1, z2, true) → c339(LOCKER2_OBTAINABLES(z1, z0))
CASE5(z0, z1, z2, false) → c340(LOCKER2_OBTAINABLES(z1, z0))
LOCKER2_CHECK_AVAILABLE(z0, cons(z1, z2)) → c342(CASE6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource))), RECORD_EXTRACT(z1, lock, resource))
CASE6(z0, z1, z2, true) → c343(RECORD_EXTRACT(z1, lock, excl), RECORD_EXTRACT(z1, lock, pending))
CASE6(z0, z1, z2, false) → c344(LOCKER2_CHECK_AVAILABLE(z2, z0))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLE(z0, z2), LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2), DELETE(z1, z0))
DELETE(z0, cons(z1, z2)) → c352(CASE8(z2, z1, z0, equal(z0, z1)))
CASE8(z0, z1, z2, false) → c354(DELETE(z2, z0))
MEMBER(z0, cons(z1, z2)) → c358(CASE9(z2, z1, z0, equal(z0, z1)))
CASE9(z0, z1, z2, false) → c360(MEMBER(z2, z0))
EQS(stack(z0, z1), stack(z2, z3)) → c364(AND(eqt(z0, z2), eqs(z1, z3)), EQT(z0, z2), EQS(z1, z3))
ISTOPS(z0, stack(z1, z2)) → c369(EQT(z0, z1))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(AND(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5))), EQT(z0, z3), AND(eqs(z1, z4), eqc(z2, z5)), EQS(z1, z4), EQC(z2, z5))
PUSH(z0, z1, calls(z2, z3, z4)) → c375(PUSH1(z0, z1, z2, z3, z4, eqt(z0, z2)), EQT(z0, z2))
PUSH1(z0, z1, z2, z3, z4, T) → c376(PUSHS(z1, z3))
K tuples:none
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_MAP_CLAIM_LOCK, LOCKER2_PROMOTE_PENDING, CASE0, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, LOCKER2_RELEASE_LOCK, CASE2, LOCKER2_OBTAINABLES, CASE5, LOCKER2_CHECK_AVAILABLE, CASE6, LOCKER2_CHECK_AVAILABLES, APPEND, SUBTRACT, DELETE, CASE8, MEMBER, CASE9, EQS, ISTOPS, EQC, PUSH, PUSH1
Compound Symbols:
c245, c271, c292, c313, c316, c321, c323, c325, c327, c328, c330, c331, c332, c334, c335, c338, c339, c340, c342, c343, c344, c346, c348, c350, c352, c354, c358, c360, c364, c369, c373, c375, c376
(3) CdtGraphRemoveDanglingProof (ComplexityIfPolyImplication transformation)
Removed 16 of 33 dangling nodes:
PUSH1(z0, z1, z2, z3, z4, T) → c376(PUSHS(z1, z3))
LOCKER2_PROMOTE_PENDING(z0, z1) → c327(CASE0(z1, z0, record_extract(z0, lock, pending)), RECORD_EXTRACT(z0, lock, pending))
LOCKER2_RELEASE_LOCK(z0, z1) → c334(CASE2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl))), GEN_MODTAGEQ(z1, record_extract(z0, lock, excl)), RECORD_EXTRACT(z0, lock, excl))
CASE2(z0, z1, true) → c335(RECORD_UPDATES(z1, lock, cons(tuple(excllock, excl), nil)))
CASE5(z0, z1, z2, true) → c339(LOCKER2_OBTAINABLES(z1, z0))
LOCKER2_OBTAINABLES(cons(z0, z1), z2) → c338(CASE5(z2, z1, z0, member(z2, record_extract(z0, lock, pending))), MEMBER(z2, record_extract(z0, lock, pending)), RECORD_EXTRACT(z0, lock, pending))
LOCKER2_CHECK_AVAILABLE(z0, cons(z1, z2)) → c342(CASE6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource))), RECORD_EXTRACT(z1, lock, resource))
CASE5(z0, z1, z2, false) → c340(LOCKER2_OBTAINABLES(z1, z0))
CASE6(z0, z1, z2, false) → c344(LOCKER2_CHECK_AVAILABLE(z2, z0))
CASE6(z0, z1, z2, true) → c343(RECORD_EXTRACT(z1, lock, excl), RECORD_EXTRACT(z1, lock, pending))
DELETE(z0, cons(z1, z2)) → c352(CASE8(z2, z1, z0, equal(z0, z1)))
MEMBER(z0, cons(z1, z2)) → c358(CASE9(z2, z1, z0, equal(z0, z1)))
CASE8(z0, z1, z2, false) → c354(DELETE(z2, z0))
CASE9(z0, z1, z2, false) → c360(MEMBER(z2, z0))
ISTOPS(z0, stack(z1, z2)) → c369(EQT(z0, z1))
CASE0(z0, z1, cons(z0, z2)) → c328(RECORD_UPDATES(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil))))
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4), RECORD_UPDATE(z0, z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_PROMOTE_PENDING(z0, z2), LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_REMOVE_PENDING(z0, z1) → c330(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)), SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)), RECORD_EXTRACT(z0, lock, pending))
LOCKER2_ADD_PENDING(z0, z1, z2) → c331(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)), MEMBER(record_extract(z0, lock, resource), z1), RECORD_EXTRACT(z0, lock, resource))
CASE1(z0, z1, z2, true) → c332(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)), APPEND(record_extract(z2, lock, pending), cons(z0, nil)), RECORD_EXTRACT(z2, lock, pending))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLE(z0, z2), LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2), DELETE(z1, z0))
EQS(stack(z0, z1), stack(z2, z3)) → c364(AND(eqt(z0, z2), eqs(z1, z3)), EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(AND(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5))), EQT(z0, z3), AND(eqs(z1, z4), eqc(z2, z5)), EQS(z1, z4), EQC(z2, z5))
PUSH(z0, z1, calls(z2, z3, z4)) → c375(PUSH1(z0, z1, z2, z3, z4, eqt(z0, z2)), EQT(z0, z2))
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4), RECORD_UPDATE(z0, z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_PROMOTE_PENDING(z0, z2), LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_REMOVE_PENDING(z0, z1) → c330(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)), SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)), RECORD_EXTRACT(z0, lock, pending))
LOCKER2_ADD_PENDING(z0, z1, z2) → c331(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)), MEMBER(record_extract(z0, lock, resource), z1), RECORD_EXTRACT(z0, lock, resource))
CASE1(z0, z1, z2, true) → c332(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)), APPEND(record_extract(z2, lock, pending), cons(z0, nil)), RECORD_EXTRACT(z2, lock, pending))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLE(z0, z2), LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2), DELETE(z1, z0))
EQS(stack(z0, z1), stack(z2, z3)) → c364(AND(eqt(z0, z2), eqs(z1, z3)), EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(AND(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5))), EQT(z0, z3), AND(eqs(z1, z4), eqc(z2, z5)), EQS(z1, z4), EQC(z2, z5))
PUSH(z0, z1, calls(z2, z3, z4)) → c375(PUSH1(z0, z1, z2, z3, z4, eqt(z0, z2)), EQT(z0, z2))
K tuples:none
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_MAP_CLAIM_LOCK, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, LOCKER2_CHECK_AVAILABLES, APPEND, SUBTRACT, EQS, EQC, PUSH
Compound Symbols:
c245, c271, c292, c313, c316, c321, c323, c325, c330, c331, c332, c346, c348, c350, c364, c373, c375
(5) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)
Split RHS of tuples not part of any SCC
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4), RECORD_UPDATE(z0, z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_PROMOTE_PENDING(z0, z2), LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLE(z0, z2), LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2), DELETE(z1, z0))
EQS(stack(z0, z1), stack(z2, z3)) → c364(AND(eqt(z0, z2), eqs(z1, z3)), EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(AND(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5))), EQT(z0, z3), AND(eqs(z1, z4), eqc(z2, z5)), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_EXTRACT(z0, lock, pending))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(MEMBER(record_extract(z0, lock, resource), z1))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(RECORD_EXTRACT(z0, lock, resource))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
CASE1(z0, z1, z2, true) → c(APPEND(record_extract(z2, lock, pending), cons(z0, nil)))
CASE1(z0, z1, z2, true) → c(RECORD_EXTRACT(z2, lock, pending))
PUSH(z0, z1, calls(z2, z3, z4)) → c(PUSH1(z0, z1, z2, z3, z4, eqt(z0, z2)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(AND(eqt(z0, z2), eqt(z1, z3)), EQT(z0, z2), EQT(z1, z3))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4), RECORD_UPDATE(z0, z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_PROMOTE_PENDING(z0, z2), LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLE(z0, z2), LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2), DELETE(z1, z0))
EQS(stack(z0, z1), stack(z2, z3)) → c364(AND(eqt(z0, z2), eqs(z1, z3)), EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(AND(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5))), EQT(z0, z3), AND(eqs(z1, z4), eqc(z2, z5)), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_EXTRACT(z0, lock, pending))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(MEMBER(record_extract(z0, lock, resource), z1))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(RECORD_EXTRACT(z0, lock, resource))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
CASE1(z0, z1, z2, true) → c(APPEND(record_extract(z2, lock, pending), cons(z0, nil)))
CASE1(z0, z1, z2, true) → c(RECORD_EXTRACT(z2, lock, pending))
PUSH(z0, z1, calls(z2, z3, z4)) → c(PUSH1(z0, z1, z2, z3, z4, eqt(z0, z2)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
K tuples:none
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_MAP_CLAIM_LOCK, LOCKER2_CHECK_AVAILABLES, APPEND, SUBTRACT, EQS, EQC, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH
Compound Symbols:
c245, c271, c292, c313, c316, c321, c323, c325, c346, c348, c350, c364, c373, c
(7) CdtGraphRemoveTrailingProof (BOTH BOUNDS(ID, ID) transformation)
Removed 15 trailing tuple parts
(8) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
K tuples:none
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(9) CdtKnowledgeProof (EQUIVALENT transformation)
The following tuples could be moved from S to K by knowledge propagation:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
CASE1(z0, z1, z2, true) → c
CASE1(z0, z1, z2, true) → c
(10) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(11) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [2] + [5]x1 + [2]x3
POL(ELEMENT(x1, x2)) = [2]x1
POL(EQC(x1, x2)) = 0
POL(EQS(x1, x2)) = 0
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [2] + [5]x1 + [3]x2 + [5]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = 0
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = 0
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = 0
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [2] + [5]x1 + [5]x2
POL(PUSH(x1, x2, x3)) = [2] + [2]x1 + [5]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [2]
POL(SUBTRACT(x1, x2)) = [1]
POL(append(x1, x2)) = [2] + [5]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = x1
POL(case8(x1, x2, x3, x4)) = [4]x1 + [2]x2 + [3]x3 + [5]x4
POL(case9(x1, x2, x3, x4)) = [4]x4
POL(cons(x1, x2)) = 0
POL(delete(x1, x2)) = [3] + [2]x1
POL(equal(x1, x2)) = 0
POL(false) = [3]
POL(int(x1)) = x1
POL(lock) = 0
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [4]x2
POL(nil) = [4]
POL(pending) = [1]
POL(pid(x1)) = 0
POL(record_extract(x1, x2, x3)) = [2] + [2]x1 + x3
POL(record_update(x1, x2, x3, x4)) = [3] + [3]x1 + [3]x2 + [2]x3 + [3]x4
POL(resource) = 0
POL(s(x1)) = [5] + x1
POL(stack(x1, x2)) = [3]
POL(subtract(x1, x2)) = [1] + [2]x2
POL(true) = [2]
POL(tuple(x1, x2)) = 0
POL(tuplenil(x1)) = 0
(12) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(13) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [3] + x2
POL(ELEMENT(x1, x2)) = [5]x1
POL(EQC(x1, x2)) = [3]x1 + [2]x2
POL(EQS(x1, x2)) = x2
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [3] + [5]x1 + x2 + [5]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = 0
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = 0
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = 0
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [3] + [2]x1 + [2]x2
POL(PUSH(x1, x2, x3)) = [5] + [5]x1 + [5]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [3] + [3]x2
POL(SUBTRACT(x1, x2)) = 0
POL(append(x1, x2)) = [5] + [3]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = [2] + [3]x1 + [3]x2 + [4]x3 + x4
POL(case9(x1, x2, x3, x4)) = [3] + [5]x1 + [5]x2 + [2]x3 + [4]x4
POL(cons(x1, x2)) = 0
POL(delete(x1, x2)) = [3] + [4]x1 + [4]x2
POL(equal(x1, x2)) = 0
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = [3]
POL(member(x1, x2)) = [3] + [3]x1
POL(nil) = [4]
POL(pending) = [2]
POL(pid(x1)) = [3]
POL(record_extract(x1, x2, x3)) = [2]x1 + [2]x2 + [3]x3
POL(record_update(x1, x2, x3, x4)) = [3] + [3]x1 + [3]x2 + [3]x3 + x4
POL(resource) = 0
POL(s(x1)) = 0
POL(stack(x1, x2)) = [4] + x1 + x2
POL(subtract(x1, x2)) = [3] + [3]x2
POL(true) = [4]
POL(tuple(x1, x2)) = 0
POL(tuplenil(x1)) = [3]
(14) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(15) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [1] + [4]x1 + x2 + [3]x3 + x4
POL(ELEMENT(x1, x2)) = [4]x1
POL(EQC(x1, x2)) = x1
POL(EQS(x1, x2)) = [2]
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [5] + [4]x1 + [5]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = 0
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = [4]x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [4]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [2] + [5]x1
POL(PUSH(x1, x2, x3)) = [4] + [5]x1 + [4]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [3]x2
POL(SUBTRACT(x1, x2)) = [1]
POL(append(x1, x2)) = [4] + [4]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = [2] + x1 + x3
POL(case8(x1, x2, x3, x4)) = [3] + [5]x1 + [2]x2 + [5]x3 + [2]x4
POL(case9(x1, x2, x3, x4)) = [4]x1 + [2]x4
POL(cons(x1, x2)) = [1] + x2
POL(delete(x1, x2)) = 0
POL(equal(x1, x2)) = 0
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [4]x2
POL(nil) = [4]
POL(pending) = [2]
POL(pid(x1)) = [4]
POL(record_extract(x1, x2, x3)) = [5] + [3]x1 + x2
POL(record_update(x1, x2, x3, x4)) = [2] + [2]x2 + [3]x3 + [3]x4
POL(resource) = 0
POL(s(x1)) = 0
POL(stack(x1, x2)) = [2]
POL(subtract(x1, x2)) = [3] + [5]x1
POL(true) = 0
POL(tuple(x1, x2)) = 0
POL(tuplenil(x1)) = [3]
(16) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(17) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [4]x1 + [5]x2
POL(ELEMENT(x1, x2)) = 0
POL(EQC(x1, x2)) = x1
POL(EQS(x1, x2)) = 0
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [3] + [4]x1 + [5]x2 + [5]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = 0
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = 0
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = 0
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [2] + [3]x1 + [3]x2
POL(PUSH(x1, x2, x3)) = [5] + [3]x1 + [4]x3
POL(RECORD_UPDATES(x1, x2, x3)) = 0
POL(SUBTRACT(x1, x2)) = x1
POL(append(x1, x2)) = [3] + [5]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = [2] + x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = 0
POL(case9(x1, x2, x3, x4)) = [3] + [3]x1 + [3]x2 + [4]x3 + [2]x4
POL(cons(x1, x2)) = [4]
POL(delete(x1, x2)) = 0
POL(equal(x1, x2)) = [2]
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = [3]
POL(member(x1, x2)) = [3] + [4]x1 + [2]x2
POL(nil) = 0
POL(pending) = [3]
POL(pid(x1)) = [5]
POL(record_extract(x1, x2, x3)) = [2] + [3]x1 + x2
POL(record_update(x1, x2, x3, x4)) = [3]x1 + [3]x2 + [3]x3 + [3]x4
POL(resource) = [4]
POL(s(x1)) = 0
POL(stack(x1, x2)) = [3]
POL(subtract(x1, x2)) = [2] + [2]x2
POL(true) = [2]
POL(tuple(x1, x2)) = [5]
POL(tuplenil(x1)) = [2]
(18) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(19) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [2]x1 + x2 + x3
POL(ELEMENT(x1, x2)) = [4]x1
POL(EQC(x1, x2)) = [4]x1 + [2]x2
POL(EQS(x1, x2)) = [2]x1
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [2]x1 + [4]x2 + [2]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = x1
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = [2]x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [4]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [4] + [3]x1 + [2]x2
POL(PUSH(x1, x2, x3)) = [5] + [2]x1
POL(RECORD_UPDATES(x1, x2, x3)) = 0
POL(SUBTRACT(x1, x2)) = [4]
POL(append(x1, x2)) = [5] + [3]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = x2 + x3
POL(case8(x1, x2, x3, x4)) = [3] + [5]x1 + [3]x2 + [3]x3 + [3]x4
POL(case9(x1, x2, x3, x4)) = [5] + [3]x1 + [3]x2 + [4]x3 + [3]x4
POL(cons(x1, x2)) = [1] + x2
POL(delete(x1, x2)) = 0
POL(equal(x1, x2)) = [4]
POL(false) = [5]
POL(int(x1)) = 0
POL(lock) = [4]
POL(mcrlrecord) = [4]
POL(member(x1, x2)) = [5] + [4]x2
POL(nil) = 0
POL(pending) = [3]
POL(pid(x1)) = [1]
POL(record_extract(x1, x2, x3)) = [2] + [3]x1 + [2]x2
POL(record_update(x1, x2, x3, x4)) = [4]x1 + [3]x2
POL(resource) = [2]
POL(s(x1)) = 0
POL(stack(x1, x2)) = x2
POL(subtract(x1, x2)) = [2] + [3]x1
POL(true) = 0
POL(tuple(x1, x2)) = 0
POL(tuplenil(x1)) = [2]
(20) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(21) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = [4]x1
POL(CASE1(x1, x2, x3, x4)) = [1] + [4]x1 + x2 + [2]x3
POL(ELEMENT(x1, x2)) = [2]x1
POL(EQC(x1, x2)) = 0
POL(EQS(x1, x2)) = 0
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [2] + [3]x1 + [4]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = 0
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = [4]x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [2]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [1] + x1
POL(PUSH(x1, x2, x3)) = [3] + [3]x1 + [2]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [1] + [2]x2
POL(SUBTRACT(x1, x2)) = [1]
POL(append(x1, x2)) = [3] + [3]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = [3] + x1
POL(case8(x1, x2, x3, x4)) = [1] + [2]x1 + x2 + x4
POL(case9(x1, x2, x3, x4)) = [3] + [3]x1 + [4]x2 + [3]x3 + [2]x4
POL(cons(x1, x2)) = [4] + x1 + x2
POL(delete(x1, x2)) = x1 + [2]x2
POL(equal(x1, x2)) = x1
POL(false) = [2]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [3] + [2]x2
POL(nil) = 0
POL(pending) = [5]
POL(pid(x1)) = [3]
POL(record_extract(x1, x2, x3)) = [2] + [4]x1 + [3]x2 + [4]x3
POL(record_update(x1, x2, x3, x4)) = [1] + [2]x1 + [3]x2 + [4]x3
POL(resource) = 0
POL(s(x1)) = 0
POL(stack(x1, x2)) = [2]
POL(subtract(x1, x2)) = [2] + [2]x2
POL(true) = [3]
POL(tuple(x1, x2)) = 0
POL(tuplenil(x1)) = 0
(22) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(23) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = [5]x1
POL(CASE1(x1, x2, x3, x4)) = [1] + x2 + [2]x3
POL(ELEMENT(x1, x2)) = [2]x1
POL(EQC(x1, x2)) = [2]x1 + [5]x2
POL(EQS(x1, x2)) = 0
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [1] + [5]x1 + [3]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = [2]x1
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = 0
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [2]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [5] + [4]x1 + [2]x2
POL(PUSH(x1, x2, x3)) = [5] + [3]x1 + [2]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [3]x2
POL(SUBTRACT(x1, x2)) = [1] + [2]x2
POL(append(x1, x2)) = [2] + [3]x1 + [5]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = x3 + [4]x4
POL(case9(x1, x2, x3, x4)) = [2] + [3]x1 + [5]x2 + [2]x3
POL(cons(x1, x2)) = [1] + x1 + x2
POL(delete(x1, x2)) = [2]x1 + x2
POL(equal(x1, x2)) = 0
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [3] + [2]x1 + x2
POL(nil) = 0
POL(pending) = 0
POL(pid(x1)) = 0
POL(record_extract(x1, x2, x3)) = 0
POL(record_update(x1, x2, x3, x4)) = [3]x1 + [5]x2 + [2]x3
POL(resource) = 0
POL(s(x1)) = 0
POL(stack(x1, x2)) = [3]
POL(subtract(x1, x2)) = [3] + x1 + [2]x2
POL(true) = [3]
POL(tuple(x1, x2)) = 0
POL(tuplenil(x1)) = 0
(24) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(25) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = [4]x1
POL(CASE1(x1, x2, x3, x4)) = [3]x1 + [3]x2
POL(ELEMENT(x1, x2)) = [5]x1 + [4]x2
POL(EQC(x1, x2)) = [2]x1
POL(EQS(x1, x2)) = [2]x1
POL(EQT(x1, x2)) = [2]x1
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [3] + [4]x1 + [4]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = [3]x1
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = [3]x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [3]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [3]x2
POL(PUSH(x1, x2, x3)) = [4] + [3]x1 + [5]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [3]x2
POL(SUBTRACT(x1, x2)) = 0
POL(append(x1, x2)) = [5] + [4]x1 + x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = [5] + [2]x1 + [3]x2 + [3]x3 + [3]x4
POL(case9(x1, x2, x3, x4)) = x1 + x2
POL(cons(x1, x2)) = x1 + x2
POL(delete(x1, x2)) = 0
POL(equal(x1, x2)) = [2]
POL(false) = [5]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = [1]
POL(member(x1, x2)) = [4] + [2]x2
POL(nil) = [1]
POL(pending) = [4]
POL(pid(x1)) = x1
POL(record_extract(x1, x2, x3)) = [4]x2
POL(record_update(x1, x2, x3, x4)) = [5]x2 + [3]x3 + [5]x4
POL(resource) = [3]
POL(s(x1)) = 0
POL(stack(x1, x2)) = [2] + x1 + x2
POL(subtract(x1, x2)) = [5] + x1 + [3]x2
POL(true) = [3]
POL(tuple(x1, x2)) = [1] + x1 + x2
POL(tuplenil(x1)) = [2] + x1
(26) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(27) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = [4]x1
POL(CASE1(x1, x2, x3, x4)) = [5] + [3]x1 + [2]x2 + [4]x3
POL(ELEMENT(x1, x2)) = 0
POL(EQC(x1, x2)) = [4]x2
POL(EQS(x1, x2)) = [3] + [4]x2
POL(EQT(x1, x2)) = [4]x2
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [5] + [4]x1 + [3]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = [4]x1
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = 0
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [3]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [2] + [5]x2
POL(PUSH(x1, x2, x3)) = [3] + [3]x1 + [4]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [2] + [2]x2
POL(SUBTRACT(x1, x2)) = [2]
POL(append(x1, x2)) = [3] + [3]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = [4] + x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = x1 + [5]x2 + [3]x3 + [2]x4
POL(case9(x1, x2, x3, x4)) = [3] + [3]x1 + [3]x2 + [3]x3 + [3]x4
POL(cons(x1, x2)) = x1 + x2
POL(delete(x1, x2)) = [2] + [2]x1
POL(equal(x1, x2)) = [4]
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = [2]
POL(member(x1, x2)) = [3]
POL(nil) = 0
POL(pending) = [4]
POL(pid(x1)) = [1] + x1
POL(record_extract(x1, x2, x3)) = [2]x1 + x2 + [2]x3
POL(record_update(x1, x2, x3, x4)) = [1] + [3]x1 + [5]x2 + [3]x3 + [3]x4
POL(resource) = [2]
POL(s(x1)) = 0
POL(stack(x1, x2)) = x1 + x2
POL(subtract(x1, x2)) = [5] + x1 + [2]x2
POL(true) = [3]
POL(tuple(x1, x2)) = x1 + x2
POL(tuplenil(x1)) = x1
(28) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(29) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [4] + [2]x2 + x3
POL(ELEMENT(x1, x2)) = [2]x1
POL(EQC(x1, x2)) = [5]x1
POL(EQS(x1, x2)) = [3]
POL(EQT(x1, x2)) = 0
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [5] + x1 + [2]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = [2]x1
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = [3]x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = 0
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [2] + [5]x1
POL(PUSH(x1, x2, x3)) = [3] + [3]x1 + [2]x3
POL(RECORD_UPDATES(x1, x2, x3)) = x3
POL(SUBTRACT(x1, x2)) = [2]
POL(append(x1, x2)) = [3] + x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = [1] + x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = [2] + [3]x1 + x2 + [5]x3 + [5]x4
POL(case9(x1, x2, x3, x4)) = [5]x1 + [3]x2 + [3]x3 + [4]x4
POL(cons(x1, x2)) = [1] + x2
POL(delete(x1, x2)) = [3] + [2]x2
POL(equal(x1, x2)) = 0
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [5] + [4]x2
POL(nil) = 0
POL(pending) = [4]
POL(pid(x1)) = 0
POL(record_extract(x1, x2, x3)) = [2] + [4]x1 + [2]x2 + [3]x3
POL(record_update(x1, x2, x3, x4)) = [3]x1 + [5]x2 + [2]x3 + [3]x4
POL(resource) = [2]
POL(s(x1)) = 0
POL(stack(x1, x2)) = [5]
POL(subtract(x1, x2)) = [3]
POL(true) = [5]
POL(tuple(x1, x2)) = [2]
POL(tuplenil(x1)) = 0
(30) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(31) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = x1
POL(CASE1(x1, x2, x3, x4)) = [1] + x1 + [3]x2 + x3
POL(ELEMENT(x1, x2)) = [2]x1 + [4]x2
POL(EQC(x1, x2)) = [5]x2
POL(EQS(x1, x2)) = [2] + [5]x2
POL(EQT(x1, x2)) = [4]x2
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [2] + [2]x1 + [4]x2 + [4]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = [3]x1
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = [5]x1
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [3] + [2]x1 + [5]x2
POL(PUSH(x1, x2, x3)) = [1] + [3]x1 + [4]x3
POL(RECORD_UPDATES(x1, x2, x3)) = 0
POL(SUBTRACT(x1, x2)) = x1 + [2]x2
POL(append(x1, x2)) = [3] + [2]x1 + [3]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = [1] + x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = x1
POL(case9(x1, x2, x3, x4)) = [4] + [3]x1 + [5]x3 + [3]x4
POL(cons(x1, x2)) = x1 + x2
POL(delete(x1, x2)) = [2]x1 + x2
POL(equal(x1, x2)) = [2]
POL(false) = [3]
POL(int(x1)) = 0
POL(lock) = [1]
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [3] + [2]x2
POL(nil) = 0
POL(pending) = 0
POL(pid(x1)) = x1
POL(record_extract(x1, x2, x3)) = [2] + x2
POL(record_update(x1, x2, x3, x4)) = [2] + [2]x1 + [5]x2 + [4]x4
POL(resource) = [3]
POL(s(x1)) = 0
POL(stack(x1, x2)) = x1 + x2
POL(subtract(x1, x2)) = [3] + [3]x2
POL(true) = [3]
POL(tuple(x1, x2)) = x1 + x2
POL(tuplenil(x1)) = [2] + x1
(32) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(33) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
We considered the (Usable) Rules:
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
subtract(z0, nil) → z0
And the Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(APPEND(x1, x2)) = 0
POL(CASE1(x1, x2, x3, x4)) = [1] + [3]x1 + x2 + [2]x3
POL(ELEMENT(x1, x2)) = [2]x1 + [2]x2
POL(EQC(x1, x2)) = [2]x2
POL(EQS(x1, x2)) = x2
POL(EQT(x1, x2)) = x2
POL(LOCKER2_ADD_PENDING(x1, x2, x3)) = [3] + [3]x1 + [2]x2 + [3]x3
POL(LOCKER2_CHECK_AVAILABLES(x1, x2)) = 0
POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3)) = [4]x1
POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2)) = 0
POL(LOCKER2_REMOVE_PENDING(x1, x2)) = [5] + [2]x1
POL(PUSH(x1, x2, x3)) = [2] + x1 + [3]x3
POL(RECORD_UPDATES(x1, x2, x3)) = [3]x2
POL(SUBTRACT(x1, x2)) = 0
POL(append(x1, x2)) = [4] + [4]x2
POL(c) = 0
POL(c(x1)) = x1
POL(c245(x1)) = x1
POL(c271(x1, x2)) = x1 + x2
POL(c292(x1, x2)) = x1 + x2
POL(c313(x1)) = x1
POL(c316(x1)) = x1
POL(c321(x1)) = x1
POL(c323(x1)) = x1
POL(c325(x1)) = x1
POL(c346(x1)) = x1
POL(c348(x1)) = x1
POL(c350(x1)) = x1
POL(c364(x1, x2)) = x1 + x2
POL(c373(x1, x2, x3)) = x1 + x2 + x3
POL(calls(x1, x2, x3)) = x1 + x2 + x3
POL(case8(x1, x2, x3, x4)) = [3] + [5]x1 + [3]x2 + [5]x3 + [5]x4
POL(case9(x1, x2, x3, x4)) = [3] + [3]x1 + [2]x2 + [3]x3 + [4]x4
POL(cons(x1, x2)) = [1] + x1 + x2
POL(delete(x1, x2)) = [2] + [3]x1 + [3]x2
POL(equal(x1, x2)) = [2]
POL(false) = [5]
POL(int(x1)) = 0
POL(lock) = 0
POL(mcrlrecord) = 0
POL(member(x1, x2)) = [3] + [3]x1 + [4]x2
POL(nil) = 0
POL(pending) = [2]
POL(pid(x1)) = x1
POL(record_extract(x1, x2, x3)) = [2] + [2]x1 + [4]x2 + [3]x3
POL(record_update(x1, x2, x3, x4)) = [3] + [5]x1 + [2]x2 + [3]x3 + [3]x4
POL(resource) = [1]
POL(s(x1)) = 0
POL(stack(x1, x2)) = x1 + x2
POL(subtract(x1, x2)) = [3] + [3]x2
POL(true) = [3]
POL(tuple(x1, x2)) = x1 + x2
POL(tuplenil(x1)) = x1
(34) Obligation:
Complexity Dependency Tuples Problem
Rules:
or(T, T) → T
or(F, T) → T
or(T, F) → T
or(F, F) → F
and(T, z0) → z0
and(z0, T) → z0
and(F, z0) → F
and(z0, F) → F
imp(T, z0) → z0
imp(F, z0) → T
not(T) → F
not(F) → T
if(T, z0, z1) → z0
if(F, z0, z1) → z1
eq(T, T) → T
eq(F, F) → T
eq(T, F) → F
eq(F, T) → F
eqt(nil, undefined) → F
eqt(nil, pid(z0)) → F
eqt(nil, int(z0)) → F
eqt(nil, cons(z0, z1)) → F
eqt(nil, tuple(z0, z1)) → F
eqt(nil, tuplenil(z0)) → F
eqt(a, nil) → F
eqt(a, a) → T
eqt(a, excl) → F
eqt(a, false) → F
eqt(a, lock) → F
eqt(a, locker) → F
eqt(a, mcrlrecord) → F
eqt(a, ok) → F
eqt(a, pending) → F
eqt(a, release) → F
eqt(a, request) → F
eqt(a, resource) → F
eqt(a, tag) → F
eqt(a, true) → F
eqt(a, undefined) → F
eqt(a, pid(z0)) → F
eqt(a, int(z0)) → F
eqt(a, cons(z0, z1)) → F
eqt(a, tuple(z0, z1)) → F
eqt(a, tuplenil(z0)) → F
eqt(excl, nil) → F
eqt(excl, a) → F
eqt(excl, excl) → T
eqt(excl, false) → F
eqt(excl, lock) → F
eqt(excl, locker) → F
eqt(excl, mcrlrecord) → F
eqt(excl, ok) → F
eqt(excl, pending) → F
eqt(excl, release) → F
eqt(excl, request) → F
eqt(excl, resource) → F
eqt(excl, tag) → F
eqt(excl, true) → F
eqt(excl, undefined) → F
eqt(excl, pid(z0)) → F
eqt(excl, eqt(false, int(z0))) → F
eqt(false, cons(z0, z1)) → F
eqt(false, tuple(z0, z1)) → F
eqt(false, tuplenil(z0)) → F
eqt(lock, nil) → F
eqt(lock, a) → F
eqt(lock, excl) → F
eqt(lock, false) → F
eqt(lock, lock) → T
eqt(lock, locker) → F
eqt(lock, mcrlrecord) → F
eqt(lock, ok) → F
eqt(lock, pending) → F
eqt(lock, release) → F
eqt(lock, request) → F
eqt(lock, resource) → F
eqt(lock, tag) → F
eqt(lock, true) → F
eqt(lock, undefined) → F
eqt(lock, pid(z0)) → F
eqt(lock, int(z0)) → F
eqt(lock, cons(z0, z1)) → F
eqt(lock, tuple(z0, z1)) → F
eqt(lock, tuplenil(z0)) → F
eqt(locker, nil) → F
eqt(locker, a) → F
eqt(locker, excl) → F
eqt(locker, false) → F
eqt(locker, lock) → F
eqt(locker, locker) → T
eqt(locker, mcrlrecord) → F
eqt(locker, ok) → F
eqt(locker, pending) → F
eqt(locker, release) → F
eqt(locker, request) → F
eqt(locker, resource) → F
eqt(locker, tag) → F
eqt(locker, true) → F
eqt(locker, undefined) → F
eqt(locker, pid(z0)) → F
eqt(locker, int(z0)) → F
eqt(locker, cons(z0, z1)) → F
eqt(locker, tuple(z0, z1)) → F
eqt(locker, tuplenil(z0)) → F
eqt(mcrlrecord, nil) → F
eqt(mcrlrecord, a) → F
eqt(mcrlrecord, excl) → F
eqt(mcrlrecord, false) → F
eqt(mcrlrecord, lock) → F
eqt(mcrlrecord, locker) → F
eqt(mcrlrecord, mcrlrecord) → T
eqt(mcrlrecord, ok) → F
eqt(mcrlrecord, pending) → F
eqt(mcrlrecord, release) → F
eqt(mcrlrecord, request) → F
eqt(mcrlrecord, resource) → F
eqt(ok, resource) → F
eqt(ok, tag) → F
eqt(ok, true) → F
eqt(ok, undefined) → F
eqt(ok, pid(z0)) → F
eqt(ok, int(z0)) → F
eqt(ok, cons(z0, z1)) → F
eqt(ok, tuple(z0, z1)) → F
eqt(ok, tuplenil(z0)) → F
eqt(pending, nil) → F
eqt(pending, a) → F
eqt(pending, excl) → F
eqt(pending, false) → F
eqt(pending, lock) → F
eqt(pending, locker) → F
eqt(pending, mcrlrecord) → F
eqt(pending, ok) → F
eqt(pending, pending) → T
eqt(pending, release) → F
eqt(pending, request) → F
eqt(pending, resource) → F
eqt(pending, tag) → F
eqt(pending, true) → F
eqt(pending, undefined) → F
eqt(pending, pid(z0)) → F
eqt(pending, int(z0)) → F
eqt(pending, cons(z0, z1)) → F
eqt(pending, tuple(z0, z1)) → F
eqt(pending, tuplenil(z0)) → F
eqt(release, nil) → F
eqt(release, a) → F
eqt(release, excl) → F
eqt(release, false) → F
eqt(release, lock) → F
eqt(release, locker) → F
eqt(release, mcrlrecord) → F
eqt(release, ok) → F
eqt(request, mcrlrecord) → F
eqt(request, ok) → F
eqt(request, pending) → F
eqt(request, release) → F
eqt(request, request) → T
eqt(request, resource) → F
eqt(request, tag) → F
eqt(request, true) → F
eqt(request, undefined) → F
eqt(request, pid(z0)) → F
eqt(request, int(z0)) → F
eqt(request, cons(z0, z1)) → F
eqt(request, tuple(z0, z1)) → F
eqt(request, tuplenil(z0)) → F
eqt(resource, nil) → F
eqt(resource, a) → F
eqt(resource, excl) → F
eqt(resource, false) → F
eqt(resource, lock) → F
eqt(resource, locker) → F
eqt(resource, mcrlrecord) → F
eqt(resource, ok) → F
eqt(resource, pending) → F
eqt(resource, release) → F
eqt(resource, request) → F
eqt(resource, resource) → T
eqt(resource, tag) → F
eqt(resource, true) → F
eqt(resource, undefined) → F
eqt(resource, pid(z0)) → F
eqt(resource, int(z0)) → F
eqt(resource, cons(z0, z1)) → F
eqt(resource, tuple(z0, z1)) → F
eqt(resource, tuplenil(z0)) → F
eqt(tag, nil) → F
eqt(tag, a) → F
eqt(tag, excl) → F
eqt(tag, false) → F
eqt(tag, lock) → F
eqt(tag, locker) → F
eqt(tag, mcrlrecord) → F
eqt(tag, ok) → F
eqt(tag, pending) → F
eqt(tag, release) → F
eqt(tag, request) → F
eqt(tag, resource) → F
eqt(tag, tag) → T
eqt(tag, true) → F
eqt(tag, undefined) → F
eqt(tag, pid(z0)) → F
eqt(tag, int(z0)) → F
eqt(tag, cons(z0, z1)) → F
eqt(tag, tuple(z0, z1)) → F
eqt(tag, tuplenil(z0)) → F
eqt(true, nil) → F
eqt(true, a) → F
eqt(true, excl) → F
eqt(true, false) → F
eqt(true, lock) → F
eqt(true, locker) → F
eqt(true, mcrlrecord) → F
eqt(true, ok) → F
eqt(true, pending) → F
eqt(true, release) → F
eqt(true, request) → F
eqt(true, resource) → F
eqt(true, tag) → F
eqt(true, true) → T
eqt(true, undefined) → F
eqt(true, pid(z0)) → F
eqt(true, int(z0)) → F
eqt(true, cons(z0, z1)) → F
eqt(true, tuple(z0, z1)) → F
eqt(true, tuplenil(z0)) → F
eqt(undefined, nil) → F
eqt(undefined, a) → F
eqt(undefined, tuplenil(z0)) → F
eqt(pid(z0), nil) → F
eqt(pid(z0), a) → F
eqt(pid(z0), excl) → F
eqt(pid(z0), false) → F
eqt(pid(z0), lock) → F
eqt(pid(z0), locker) → F
eqt(pid(z0), mcrlrecord) → F
eqt(pid(z0), ok) → F
eqt(pid(z0), pending) → F
eqt(pid(z0), release) → F
eqt(pid(z0), request) → F
eqt(pid(z0), resource) → F
eqt(pid(z0), tag) → F
eqt(pid(z0), true) → F
eqt(pid(z0), undefined) → F
eqt(pid(z0), pid(z1)) → eqt(z0, z1)
eqt(pid(z0), int(z1)) → F
eqt(pid(z0), cons(z1, z2)) → F
eqt(pid(z0), tuple(z1, z2)) → F
eqt(pid(z0), tuplenil(z1)) → F
eqt(int(z0), nil) → F
eqt(int(z0), a) → F
eqt(int(z0), excl) → F
eqt(int(z0), false) → F
eqt(int(z0), lock) → F
eqt(int(z0), locker) → F
eqt(int(z0), mcrlrecord) → F
eqt(int(z0), ok) → F
eqt(int(z0), pending) → F
eqt(int(z0), release) → F
eqt(int(z0), request) → F
eqt(int(z0), resource) → F
eqt(int(z0), tag) → F
eqt(int(z0), true) → F
eqt(int(z0), undefined) → F
eqt(cons(z0, z1), resource) → F
eqt(cons(z0, z1), tag) → F
eqt(cons(z0, z1), true) → F
eqt(cons(z0, z1), undefined) → F
eqt(cons(z0, z1), pid(z2)) → F
eqt(cons(z0, z1), int(z2)) → F
eqt(cons(z0, z1), cons(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(cons(z0, z1), tuple(z2, z3)) → F
eqt(cons(z0, z1), tuplenil(z2)) → F
eqt(tuple(z0, z1), nil) → F
eqt(tuple(z0, z1), a) → F
eqt(tuple(z0, z1), excl) → F
eqt(tuple(z0, z1), false) → F
eqt(tuple(z0, z1), lock) → F
eqt(tuple(z0, z1), locker) → F
eqt(tuple(z0, z1), mcrlrecord) → F
eqt(tuple(z0, z1), ok) → F
eqt(tuple(z0, z1), pending) → F
eqt(tuple(z0, z1), release) → F
eqt(tuple(z0, z1), request) → F
eqt(tuple(z0, z1), resource) → F
eqt(tuple(z0, z1), tag) → F
eqt(tuple(z0, z1), true) → F
eqt(tuple(z0, z1), undefined) → F
eqt(tuple(z0, z1), pid(z2)) → F
eqt(tuple(z0, z1), int(z2)) → F
eqt(tuple(z0, z1), cons(z2, z3)) → F
eqt(tuple(z0, z1), tuple(z2, z3)) → and(eqt(z0, z2), eqt(z1, z3))
eqt(tuple(z0, z1), tuplenil(z2)) → F
eqt(tuplenil(z0), nil) → F
eqt(tuplenil(z0), a) → F
eqt(tuplenil(z0), excl) → F
eqt(tuplenil(z0), false) → F
eqt(tuplenil(z0), lock) → F
eqt(tuplenil(z0), locker) → F
eqt(tuplenil(z0), mcrlrecord) → F
eqt(tuplenil(z0), ok) → F
eqt(tuplenil(z0), pending) → F
eqt(tuplenil(z0), release) → F
eqt(tuplenil(z0), request) → F
eqt(tuplenil(z0), resource) → F
eqt(tuplenil(z0), tag) → F
eqt(tuplenil(z0), true) → F
eqt(tuplenil(z0), undefined) → F
eqt(tuplenil(z0), pid(z1)) → F
eqt(tuplenil(z0), int(z1)) → F
eqt(tuplenil(z0), cons(z1, z2)) → F
eqt(tuplenil(z0), tuple(z1, z2)) → F
eqt(tuplenil(z0), tuplenil(z1)) → eqt(z0, z1)
element(int(s(0)), tuplenil(z0)) → z0
element(int(s(0)), tuple(z0, z1)) → z0
element(int(s(s(z0))), tuple(z1, z2)) → element(int(s(z0)), z2)
record_new(lock) → tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
record_extract(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, resource) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2)))))
record_update(tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z2))))), lock, pending, z3) → tuple(mcrlrecord, tuple(lock, tuple(z0, tuple(z1, tuplenil(z3)))))
record_updates(z0, z1, nil) → z0
record_updates(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → record_updates(record_update(z0, z1, z2, z3), z1, z4)
locker2_map_promote_pending(nil, z0) → nil
locker2_map_promote_pending(cons(z0, z1), z2) → cons(locker2_promote_pending(z0, z2), locker2_map_promote_pending(z1, z2))
locker2_map_claim_lock(nil, z0, z1) → nil
locker2_map_claim_lock(cons(z0, z1), z2, z3) → cons(locker2_claim_lock(z0, z2, z3), locker2_map_claim_lock(z1, z2, z3))
locker2_map_add_pending(nil, z0, z1) → nil
locker2_promote_pending(z0, z1) → case0(z1, z0, record_extract(z0, lock, pending))
case0(z0, z1, cons(z0, z2)) → record_updates(z1, lock, cons(tuple(excl, tuplenil(z0)), cons(tuple(pending, tuplenil(z2)), nil)))
case0(z0, z1, z2) → z1
locker2_remove_pending(z0, z1) → record_updates(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil))
locker2_add_pending(z0, z1, z2) → case1(z2, z1, z0, member(record_extract(z0, lock, resource), z1))
case1(z0, z1, z2, true) → record_updates(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil))
case1(z0, z1, z2, false) → z2
locker2_release_lock(z0, z1) → case2(z1, z0, gen_modtageq(z1, record_extract(z0, lock, excl)))
case2(z0, z1, true) → record_updates(z1, lock, cons(tuple(excllock, excl), nil))
case4(z0, z1, z2) → false
locker2_obtainables(nil, z0) → true
locker2_obtainables(cons(z0, z1), z2) → case5(z2, z1, z0, member(z2, record_extract(z0, lock, pending)))
case5(z0, z1, z2, true) → andt(locker2_obtainable(z2, z0), locker2_obtainables(z1, z0))
case5(z0, z1, z2, false) → locker2_obtainables(z1, z0)
locker2_check_available(z0, nil) → false
locker2_check_available(z0, cons(z1, z2)) → case6(z2, z1, z0, equal(z0, record_extract(z1, lock, resource)))
case6(z0, z1, z2, true) → andt(equal(record_extract(z1, lock, excl), nil), equal(record_extract(z1, lock, pending), nil))
case6(z0, z1, z2, false) → locker2_check_available(z2, z0)
locker2_check_availables(nil, z0) → true
locker2_check_availables(cons(z0, z1), z2) → andt(locker2_check_available(z0, z2), locker2_check_availables(z1, z2))
locker2_adduniq(nil, z0) → z0
append(cons(z0, z1), z2) → cons(z0, append(z1, z2))
subtract(z0, nil) → z0
subtract(z0, cons(z1, z2)) → subtract(delete(z1, z0), z2)
delete(z0, nil) → nil
delete(z0, cons(z1, z2)) → case8(z2, z1, z0, equal(z0, z1))
case8(z0, z1, z2, true) → z0
case8(z0, z1, z2, false) → cons(z1, delete(z2, z0))
gen_tag(z0) → tuple(z0, tuplenil(tag))
gen_modtageq(z0, z1) → equal(z0, z1)
member(z0, nil) → false
member(z0, cons(z1, z2)) → case9(z2, z1, z0, equal(z0, z1))
case9(z0, z1, z2, true) → true
case9(z0, z1, z2, false) → member(z2, z0)
eqs(empty, empty) → T
eqs(empty, stack(z0, z1)) → F
eqs(stack(z0, z1), empty) → F
eqs(stack(z0, z1), stack(z2, z3)) → and(eqt(z0, z2), eqs(z1, z3))
pushs(z0, z1) → stack(z0, z1)
pops(stack(z0, z1)) → z1
tops(stack(z0, z1)) → z0
istops(z0, empty) → F
istops(z0, stack(z1, z2)) → eqt(z0, z1)
eqc(nocalls, nocalls) → T
eqc(nocalls, calls(z0, z1, z2)) → F
eqc(calls(z0, z1, z2), nocalls) → F
eqc(calls(z0, z1, z2), calls(z3, z4, z5)) → and(eqt(z0, z3), and(eqs(z1, z4), eqc(z2, z5)))
push(z0, z1, nocalls) → calls(z0, stack(z1, empty), nocalls)
push(z0, z1, calls(z2, z3, z4)) → push1(z0, z1, z2, z3, z4, eqt(z0, z2))
push1(z0, z1, z2, z3, z4, T) → calls(z2, pushs(z1, z3), z4)
Tuples:
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
S tuples:none
K tuples:
LOCKER2_REMOVE_PENDING(z0, z1) → c(RECORD_UPDATES(z0, lock, cons(tuple(pending, tuplenil(subtract(record_extract(z0, lock, pending), cons(z1, nil)))), nil)))
LOCKER2_REMOVE_PENDING(z0, z1) → c(SUBTRACT(record_extract(z0, lock, pending), cons(z1, nil)))
LOCKER2_ADD_PENDING(z0, z1, z2) → c(CASE1(z2, z1, z0, member(record_extract(z0, lock, resource), z1)))
CASE1(z0, z1, z2, true) → c(RECORD_UPDATES(z2, lock, cons(tuple(pending, tuplenil(append(record_extract(z2, lock, pending), cons(z0, nil)))), nil)))
PUSH(z0, z1, calls(z2, z3, z4)) → c(EQT(z0, z2))
LOCKER2_REMOVE_PENDING(z0, z1) → c
LOCKER2_ADD_PENDING(z0, z1, z2) → c
CASE1(z0, z1, z2, true) → c
PUSH(z0, z1, calls(z2, z3, z4)) → c
ELEMENT(int(s(s(z0))), tuple(z1, z2)) → c316(ELEMENT(int(s(z0)), z2))
EQS(stack(z0, z1), stack(z2, z3)) → c364(EQT(z0, z2), EQS(z1, z3))
LOCKER2_MAP_CLAIM_LOCK(cons(z0, z1), z2, z3) → c325(LOCKER2_MAP_CLAIM_LOCK(z1, z2, z3))
LOCKER2_MAP_PROMOTE_PENDING(cons(z0, z1), z2) → c323(LOCKER2_MAP_PROMOTE_PENDING(z1, z2))
EQC(calls(z0, z1, z2), calls(z3, z4, z5)) → c373(EQT(z0, z3), EQS(z1, z4), EQC(z2, z5))
LOCKER2_CHECK_AVAILABLES(cons(z0, z1), z2) → c346(LOCKER2_CHECK_AVAILABLES(z1, z2))
APPEND(cons(z0, z1), z2) → c348(APPEND(z1, z2))
SUBTRACT(z0, cons(z1, z2)) → c350(SUBTRACT(delete(z1, z0), z2))
EQT(tuple(z0, z1), tuple(z2, z3)) → c292(EQT(z0, z2), EQT(z1, z3))
EQT(pid(z0), pid(z1)) → c245(EQT(z0, z1))
RECORD_UPDATES(z0, z1, cons(tuple(z2, tuplenil(z3)), z4)) → c321(RECORD_UPDATES(record_update(z0, z1, z2, z3), z1, z4))
EQT(tuplenil(z0), tuplenil(z1)) → c313(EQT(z0, z1))
EQT(cons(z0, z1), cons(z2, z3)) → c271(EQT(z0, z2), EQT(z1, z3))
Defined Rule Symbols:
or, and, imp, not, if, eq, eqt, element, record_new, record_extract, record_update, record_updates, locker2_map_promote_pending, locker2_map_claim_lock, locker2_map_add_pending, locker2_promote_pending, case0, locker2_remove_pending, locker2_add_pending, case1, locker2_release_lock, case2, case4, locker2_obtainables, case5, locker2_check_available, case6, locker2_check_availables, locker2_adduniq, append, subtract, delete, case8, gen_tag, gen_modtageq, member, case9, eqs, pushs, pops, tops, istops, eqc, push, push1
Defined Pair Symbols:
EQT, ELEMENT, LOCKER2_MAP_CLAIM_LOCK, APPEND, LOCKER2_REMOVE_PENDING, LOCKER2_ADD_PENDING, CASE1, PUSH, RECORD_UPDATES, LOCKER2_MAP_PROMOTE_PENDING, LOCKER2_CHECK_AVAILABLES, SUBTRACT, EQS, EQC
Compound Symbols:
c245, c313, c316, c325, c348, c, c271, c292, c321, c323, c346, c350, c364, c373, c
(35) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(36) BOUNDS(O(1), O(1))